- css_class = '' unless local_assigns[:css_class]
- css_class += ' no-description' if group.description.blank?

%li.group-row{ class: css_class }
  .controls.hidden-xs
    = link_to '编辑', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: 'btn btn-grouped btn-sm'
    = link_to '销毁', [:admin, group], data: {confirm: "确定要删除 #{group.name}？"}, method: :delete, class: 'btn btn-grouped btn-sm btn-remove'

  .stats
    %span
      = icon('bookmark')
      = number_with_delimiter(group.projects.count)

    %span
      = icon('users')
      = number_with_delimiter(group.users.count)

    %span.visibility-icon.has-tooltip{data: { container: 'body', placement: 'left' }, title: visibility_icon_description(group)}
      = visibility_level_icon(group.visibility_level, fw: false)

  = image_tag group_icon(group), class: 'avatar s40 hidden-xs'
  .title
    = link_to [:admin, group], class: 'group-name' do
      = group.name

  - if group.description.present?
    .description
      = markdown(group.description, pipeline: :description)
